<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
	<script src="jquery-1.8.3.min.js"></script>
</head>
<body>
<input type="button" id="fan" value="反选">
<hr>
<input type="checkbox">HTML
<br>
<input type="checkbox">CSS
<br>
<input type="checkbox">PHP
<br>
<input type="checkbox">MYSQL
<br>
<input type="checkbox">JAVA
<br>
<input type="checkbox">C/C++
<br>
<input type="checkbox">PYTHON
<br>

<script>
	$("#fan").click(function () {
		$(":checkbox").each(function () {
			// 如果选中就改为不选中，不选中就改为选中
			if (this.checked == true){
				this.checked = false;
			}else {
				this.checked = true;
			}
		})
	})
</script>
</body>
</html>